Skip to content

Fixes to write/erase failures observed on Winbond SPI flash W25Q128JV#4

Open
jcard0na wants to merge 3 commits intoChurrosoft:masterfrom
jcard0na:upstream
Open

Fixes to write/erase failures observed on Winbond SPI flash W25Q128JV#4
jcard0na wants to merge 3 commits intoChurrosoft:masterfrom
jcard0na:upstream

Conversation

@jcard0na
Copy link
Copy Markdown

These changes solve several issues we observed with this driver and Winbond's SPI flash W25Q128JV.
The observed symptoms were occasional failed erase and write operations. The example code in the first commit reveals the problems and we observe many failures unless the subsequent commits are applied.

START
Identification([ef, 40, 18])
Erasing sectors
write iteration 0/100
...
write iteration 53/100
Failed verification
write iteration 54/100
write iteration 55/100
...
Erasing blocks
Failed verification
write iteration 91/100
...
Erasing full chip
Failed verification
write iteration 99/100
num failures: 10
DONE

Javier Cardona added 3 commits November 30, 2023 21:44
This example does result in verification failures
in a setup with STM32 and Winbond W25Q128JV flash.
Any write or erase command will be ignored unless this bit is set, so
make sure the WEL bit is set before exiting write_enable().
The WEL bit is set in response to the Write Enable command, but prior to
this change, the WEL bit status was not being checked.  This would
result in occasional erase failures.
This addresses two failure modes associated with the reading of the BUSY
status bit:  the case when the BUSY bit is not yet set on entering the
function, and the case where it is briefly cleared but immediately
reset by the chip.  The latter is not really documented behavior but has
been observed on Winbond W25Q128JV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant